package com.tju.backend.dao.sys_user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tju.backend.entity.SysUser;
import com.tju.backend.utils.tool.ClientParameters;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * Query the data by login name
     *
     * @param username
     * @return
     */
    SysUser getUserByUserName(String username);

    /**
     * Conditional query data
     *
     * @param page
     * @param parameters
     * @return
     */
    IPage<SysUser> selectPageExt(Page<SysUser> page, @Param("pu") ClientParameters parameters);

}